Skip to content

adding optional field for FieldColumns#124

Draft
oklex wants to merge 2 commits intomasterfrom
schema-view-options
Draft

adding optional field for FieldColumns#124
oklex wants to merge 2 commits intomasterfrom
schema-view-options

Conversation

@oklex
Copy link
Contributor

@oklex oklex commented Nov 12, 2024

Description of the change

The plan was always to reveal more optional fields into the extensions UI that a back-end developer could use as needed, and a field for number of columns seems like it would be relevant for git-sync.

@josh-lc could I ask you to sanity check that this simple commit will accurately allow for an optional field to be added onto all schemas? I don't want this field to ever show up as an empty value on the schema if it can be helped because I think that gives the impression that it needs a value and it really doesn't.

For context, this field is typically auto-determined on the front-end and we would basically just be adding a field to the schema to override this value.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Fix refractionPOINT/tracking#1

@oklex oklex requested a review from josh-lc November 12, 2024 21:50
DefaultRequests []string `json:"default_requests" msgpack:"default_requests"`

// optional UI view settins: more exist on FE "LayoutOptions" but aren't all exposed via schema
FieldColumns int `json:"field_columns" msgpack:"field_columns"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oklex looks good, but if you want to omit the return values if there is no value lets do this and that should ensure we don't return a empty value to frontend

FieldColumns int json:"field_columns,omitempty" msgpack:"field_columns,omitempty"

@josh-lc josh-lc self-requested a review November 13, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants